import request from "@/utils/request";

// 汇率管理列表
export function getRateList(params) {
  return request({
    url: "/exchangeRate",
    method: "get",
    params,
  });
}
//新增或汇率
export function addRate(data) {
  return request({
    url: "/exchangeRate",
    method: "post",
    data,
  });
}
//编辑汇率
export function editRate(data) {
  return request({
    url: `/exchangeRate/${data.id}`,
    method: "put",
    data,
  });
}

//批量删除
export function deleteRate(data) {
  return request({
    url: `/exchangeRate/batch/destroy`,
    method: "POST",
    data,
  });
}
//启用禁用
export function changeStatus(data) {
  return request({
    url: `exchangeRate/batch/switch/state`,
    method: "patch",
    data,
  });
}